﻿using System;
using AccountHelper.Common;
using Microsoft.Phone.Controls;
using System.Windows;
using System.Windows.Media.Imaging;
using System.Windows.Media;
using Microsoft.Phone.Shell;

namespace AccountHelper.View
{
    public partial class TestLab : PhoneApplicationPage
    {
        public TestLab()
        {
            InitializeComponent();

            
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            var im = new ImmediateLocation((p) =>
            {
                this.textBlock1.Text = "Latitude" + p.Latitude.ToString() + "....Longitude:" + p.Longitude.ToString();
            });
            im.GetLocation();
        }

        private void button2_Click(object sender, RoutedEventArgs e)
        {
            ProgressIndicator pi = new ProgressIndicator();
            pi.Text = "Hello World";
            pi.IsIndeterminate = true;
            pi.IsVisible = true;
            SetValue(SystemTray.ProgressIndicatorProperty, pi);
            SetValue(SystemTray.IsVisibleProperty, true);
            BitmapImage bi = new BitmapImage(new Uri("/Images/a97911.jpg", UriKind.Relative));
            this.image1.Source = bi;
        }
    }
}